package kr.co.mustgo.domain.freeboard;

import java.io.Serializable;

public class FreeComment implements Serializable{
	
	private int reCode;
	private String name;
	private String contents;
	private String insertDate;
	private int code;
	
	
	
	public int getReCode() {
		return reCode;
	}
	public void setReCode(int reCode) {
		this.reCode = reCode;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getContents() {
		return contents;
	}
	public void setContents(String contents) {
		this.contents = contents;
	}
	public String getInsertDate() {
		return insertDate;
	}
	public void setInsertDate(String insertDate) {
		this.insertDate = insertDate;
	}
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + code;
		result = prime * result
				+ ((contents == null) ? 0 : contents.hashCode());
		result = prime * result
				+ ((insertDate == null) ? 0 : insertDate.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + reCode;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		FreeComment other = (FreeComment) obj;
		if (code != other.code)
			return false;
		if (contents == null) {
			if (other.contents != null)
				return false;
		} else if (!contents.equals(other.contents))
			return false;
		if (insertDate == null) {
			if (other.insertDate != null)
				return false;
		} else if (!insertDate.equals(other.insertDate))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (reCode != other.reCode)
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "Comment [reCode=" + reCode + ", name=" + name + ", contents="
				+ contents + ", insertDate=" + insertDate + ", code=" + code
				+ "]";
	}
	public FreeComment() {
		super();
	}
	public FreeComment(int reCode, String name, String contents, String insertDate,
			int code) {
		super();
		this.reCode = reCode;
		this.name = name;
		this.contents = contents;
		this.insertDate = insertDate;
		this.code = code;
	}
	public FreeComment(String name, String contents) {
		super();
		this.name = name;
		this.contents = contents;
	}

}
